package com.asset.crm.domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@SuppressWarnings("serial")
@Entity
@Table(name="department")
public class Department implements Serializable{
	
	
	private Integer id;
	
	private String deptName;
	
	private Integer deptMangerId;
	
	private Integer companyId;
	private Set<Employee> employees;
	

	/**
	 * @return the employees
	 */
	@OneToMany(mappedBy="dept")
	public Set<Employee> getEmployees() {
		return employees;
	}

	/**
	 * @param employees the employees to set
	 */
	public void setEmployees(Set<Employee> employees) {
		this.employees = employees;
	}

	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="department_id_seq")
	@SequenceGenerator(name="department_id_seq",sequenceName="department_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the deptName
	 */
	@Column(name= "dept_name")
	public String getDeptName() {
		return deptName;
	}

	/**
	 * @param deptName the deptName to set
	 */
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	/**
	 * @return the deptMangerId
	 */
	@Column(name= "dept_manager_id")
	public Integer getDeptMangerId() {
		return deptMangerId;
	}

	/**
	 * @param deptMangerId the deptMangerId to set
	 */
	public void setDeptMangerId(Integer deptMangerId) {
		this.deptMangerId = deptMangerId;
	}

	/**
	 * @return the companyId
	 */
	@Column(name= "company_id")
	public Integer getCompanyId() {
		return companyId;
	}

	/**
	 * @param companyId the companyId to set
	 */
	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}
	
	

}
